<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <base href="/">
    <!-- 下拉框 -->
    <link rel="stylesheet" href="static/ace/css/chosen.css"/>
    <!-- jsp文件头和头部 -->
    <%@ include file="../../system/index/top.jsp" %>
    <!-- 日期框 -->
    <link rel="stylesheet" href="static/ace/css/datepicker.css"/>
</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <form action="fruitUser/saveUser" name="userForm" id="userForm" method="post">
                            <div id="zhongxin" style="padding-top: 13px;">
                                <table id="table_report" class="table table-striped table-bordered table-hover">
                                    <tr>
                                        <td style="width:100px;text-align: right;padding-top: 13px;">姓名:</td>
                                        <td><input type="text" name="realName" id="realName" placeholder="这里输入姓名"
                                                   title="姓名" style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="width:100px;text-align: right;padding-top: 13px;">手机号:</td>
                                        <td><input type="text" name="phone" id="phone" placeholder="这里输入手机号" title="手机号"
                                                   style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="width:100px;text-align: right;padding-top: 13px;">密码:</td>
                                        <td><input type="text" name="pwd" id="pwd" placeholder="这里输入密码" title="密码"
                                                   style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;" colspan="10">
                                            <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
                                            <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><img
                                    src="static/images/jiazai.gif"/><br/><h4 class="lighter block green"></h4></div>
                        </form>
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>
    </div>
    <!-- /.main-content -->
</div>
<!-- /.main-container -->
<!-- basic scripts -->
<!-- 页面底部js¨ -->
<%@ include file="../../system/index/foot.jsp" %>
<!-- ace scripts -->
<script src="static/ace/js/ace/ace.js"></script>
<!-- inline scripts related to this page -->
<!-- 下拉框 -->
<script src="static/ace/js/chosen.jquery.js"></script>
<!--提示框-->
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
<script type="text/javascript" src="static/js/common/file_upload.js"></script>
<script type="text/javascript" src="plugins/kindeditor/kindeditor-all.js"></script>
<script type="text/javascript" src="plugins/kindeditor/lang/zh_CN.js"></script>

</body>
<script type="text/javascript">
    $(top.hangge());
    <%-- 	$("#phone").change(function(){
            $.ajax({
                url:"<%=basePath%>userinfo/checkPhone",
                type:"post",
                data:{"phone":$(this).val()},
                success : function(data) {
                   if(data=="PHONE_FORMAT_ERROR"){
                       alert("手机号格式不正确！")
                       $("#phone").val("");
                   }else if(data=="USER_EXIST"){
                       alert("此手机号已被注册！");
                       $("#phone").val("");
                   }else{
                       //手机号正确
                   }
                },error : function(XMLHttpRequest, textStatus){
                }
            });

        }); --%>

    function save() {
        if ($("#realName").val() == "") {
            alert("姓名不能为空");
            return false;
        }
        if ($("#phone").val() == "") {
            alert("手机号不能为空");
            return false;
        }
        if ($("#pwd").val() == "") {
            alert("密码不能为空");
            return false;
        }
        $("#userForm").submit();
        $("#zhongxin").hide();
        $("#zhongxin2").show();
    }
</script>
</html>